package com.artPreter.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.artPreter.pojo.ArtistRelative;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.artPreter.pojo.dto.ArtistRelativeDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 艺术机构-艺术家关系表 Mapper 接口
 * </p>
 *
 * @author jarvis
 * @since 2024-11-15
 */
@Mapper
public interface ArtistRelativeMapper extends BaseMapper<ArtistRelative> {

    @Select(" select s.*,a.name as departName from jv_artist_relative s LEFT JOIN jv_depart a on s.depart_id = a.depart_id ${ew.customSqlSegment} ")
    List<ArtistRelativeDTO> getListByArtistId(@Param(Constants.WRAPPER) Wrapper wrapper);
}
